@page "/no-permission"
@using Application.Web.Core.Services
@using Application.Service.Permissions
@inject PermissionService PermissionService
@inject NavigationManager Navigation

<PageTitle>无访问权限</PageTitle>

<div class="container-fluid d-flex align-items-center justify-content-center" style="height: 80vh;">
    <div class="text-center">
        <div class="mb-4">
            <i class="fa-solid fa-ban fa-5x text-danger"></i>
        </div>
        <h1 class="display-4 text-danger mb-3">访问被拒绝</h1>
        <p class="lead mb-4">您没有权限访问此页面。</p>
        <div class="d-flex justify-content-center gap-3">
            <button class="btn btn-primary" @onclick="GoToHome">
                <i class="fa-solid fa-home me-2"></i>返回首页
            </button>
            <button class="btn btn-outline-secondary" @onclick="GoBack">
                <i class="fa-solid fa-arrow-left me-2"></i>返回上一页
            </button>
        </div>
    </div>
</div>

@code {
    private void GoToHome()
    {
        Navigation.NavigateTo("/");
    }

    private void GoBack()
    {
        Navigation.NavigateTo("/");
    }
}